package com.sgb.kjwl.view.widget;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.sgb.kjwl.R;

public class EmptyViewUtils {
    private static EmptyViewUtils instance;

    private EmptyViewUtils() {
    }

    public synchronized static EmptyViewUtils getInstance() {
        if (instance == null) {
            instance = new EmptyViewUtils();
        }
        return instance;
    }

    public View getEmptyView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.no_data_view, null);
        ImageView imageView = view.findViewById(R.id.iv_null);
        Glide.with(context).load(R.drawable.null_img).load(DiskCacheStrategy.RESOURCE).into(imageView);
        return view;
    }

}
